﻿using System;
using UniMana.Data;

namespace UniMana.Win.Leadership
{
    public partial class FrmLog_ForceCanceled_Censorship_Confirm_ : DevExpress.XtraEditors.XtraForm
    {
        private DBMain m_data = new DBMain();
        Log_ForceCanceledInfo force = new Log_ForceCanceledInfo();

        public FrmLog_ForceCanceled_Censorship_Confirm_(Log_ForceCanceledInfo force)
        {
            InitializeComponent();           
            this.force = force;
        }

        private void FrmLog_ForceCanceled_Censorship_Confirm__Load(object sender, EventArgs e)
        {
            lbcID.Text = force.Properties.Log_ForceCanceledKey + " ?";
        }

        /// <summary>
        /// Đồng ý không phê duyệt
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void btnYes_Click(object sender, EventArgs e)
        {
            Log_TranferData.m_bFlag = true;
            force.Properties.Feedback = rtbFeedback.Text;
            force.Properties.Refuse = true;
            force.Properties.Status = true;
            force.Properties.CensorshipUser = UniMana.Utils.LoginInfo.GblLoginInfo.sysLoginUserKey;
            force.Properties.CensorshipTime = SysDateTime.Now;
            force.Save();
            this.Close();
        }

        /// <summary>
        /// Không đồng ý
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void btnNo_Click(object sender, EventArgs e)
        {
            Log_TranferData.m_bFlag = false;
            this.Close();
        }
    }
}
